home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / misc / math / Laplace.lha / Laplace / Data / Docs_english_doc.lha / Functions.doc < prev    next >
Encoding:
Text File  |  1996-09-19  |  17.4 KB  |  911 lines

  1. abs()
  2. =====
  3.  
  4.        sypnosis:
  5.     abs(x)
  6.  
  7.        arguments:
  8.     x: number, vector
  9.  
  10.        result:
  11. number
  12.  
  13.    If x is a number, the absolute of x is returned. If x is a
  14. vector, the (euclidian) length of the vector is returned.
  15.  
  16. addrows()
  17. =========
  18.  
  19.        sypnosis:
  20.     addrows(m,r1,r2,x)
  21.  
  22.        arguments:
  23.     m: matrix
  24.     r1,r2: integer between 0 and rows(m)
  25.     x: number
  26.  
  27.        result:
  28. matrix
  29.  
  30.    Returns the matrix m, except that row r1 is replaced by (row
  31. r1) + x * (row r2).
  32.  
  33. arc()
  34. =====
  35.  
  36.        sypnosis:
  37.     arc(x)
  38.  
  39.        arguments:
  40.     x: number
  41.  
  42.        result:
  43. number
  44.  
  45.    If x is a complex number, the angle between x and the x-axis in
  46. the gaussian plane will be returned, which is defined as atan(im(x) /
  47. re(x))
  48.  
  49.        arc() of an positive real number is defined as 1 and of a
  50. negative as -1.
  51.  
  52. average()
  53. =========
  54.  
  55.        sypnosis:
  56.     average(s)
  57.  
  58.        arguments:
  59.     s: set
  60.  
  61.        result:
  62. depends on set contents
  63.  
  64.    Returns the arithmetic average of the set contents.
  65.  
  66. cols()
  67. ======
  68.  
  69.        sypnosis:
  70.     cols(m)
  71.  
  72.        arguments:
  73.     m: matrix
  74.  
  75.        result:
  76. number
  77.  
  78.    Returns the number of columns of the matrix m.
  79.  
  80. combine()
  81. =========
  82.  
  83.        sypnosis:
  84.     combine(a1a2...)
  85.  
  86.        arguments:
  87.     a1, a2...: vector, matrix
  88.  
  89.        result:
  90. matrix
  91.  
  92.    Returns a matrix constructed from the given column vectors and
  93. matrices.
  94.  
  95. conj()
  96. ======
  97.  
  98.        sypnosis:
  99.     conj(x)
  100.  
  101.        arguments:
  102.     x: number
  103.  
  104.        result:
  105. number
  106.  
  107.    Returns the complex conjunction of x.
  108.  
  109. const()
  110. =======
  111.  
  112.        sypnosis:
  113.     const(name1,name2...)
  114.  
  115.        arguments:
  116.     name1,name2...: constant names
  117.  
  118.        result:
  119. n/a
  120.  
  121.        const() will create constants with the given names.
  122.  
  123.    You can specify an optional type identifier for each name by entering
  124. name:type, see Manual/Types.
  125.  
  126. count()
  127. =======
  128.  
  129.        sypnosis:
  130.     count(s)
  131.  
  132.        arguments:
  133.     s: set
  134.  
  135.        result:
  136. number
  137.  
  138.    Return the number of elementes in the set s.
  139.  
  140. cvector()
  141. =========
  142.  
  143.        sypnosis:
  144.     cvector(m,c)
  145.  
  146.        arguments:
  147.     m: matrix
  148.     c: integer between 0 and cols(m)
  149.  
  150.        result:
  151. vector
  152.  
  153.    Returns a vector, consisting of the column c of the matrix m.
  154.  
  155. debug()
  156. =======
  157.  
  158.        sypnosis:
  159.     debug(string)
  160.  
  161.        arguments:
  162.     string: any string
  163.  
  164.        result:
  165. n/a
  166.  
  167.    This will add the string to the debug list.
  168.  
  169. det()
  170. =====
  171.  
  172.        sypnosis:
  173.     det(m)
  174.  
  175.        arguments:
  176.     m: matrix
  177.  
  178.        result:
  179. number
  180.  
  181.    Returns the determinant of the matrix m.
  182.  
  183. diff()
  184. ======
  185.  
  186.        sypnosis:
  187.     diff(ex,var)
  188.  
  189.        arguments:
  190.     ex: any expression
  191.     var: variable name
  192.  
  193.        result:
  194. depends on expression type
  195.  
  196.    This will calculate the first (partial) derivation of the given
  197. expression.
  198.  
  199.    Some examples:
  200.      f'(x) = diff(x^2, x)
  201.      
  202.      f(x) = x^2
  203.      f'(x) = diff(f, x)
  204.      
  205.      f(x, y) = x^2 + y^3
  206.      f_x'(x, y) = diff(f, x)
  207.      f_y'(x, y) = diff(f, y)
  208.      g(x) = diff(f(x,1), x)
  209.  
  210. Remark
  211. ------
  212.  
  213.    If you use diff() as a 'stand alone' expression that means not as
  214. the right side of an function definition and the used variables are not
  215. defined in this context and they are created as constant objects. This
  216. can lead to errors if the same name was used earlier but with another
  217. type, e.g.:
  218.      x=[1,2,3]
  219.      ...
  220.      f(x)=sin(x)
  221.      diff(f, x)
  222.  
  223.    You should then declare x as a constant before you use diff(), or
  224. use something like f'(x) = diff(f, x).
  225.  
  226. dim()
  227. =====
  228.  
  229.        sypnosis:
  230.     dim(v)
  231.  
  232.        arguments:
  233.     v: vector
  234.  
  235.        result:
  236. number
  237.  
  238.    Return the dimension of the vector v.
  239.  
  240. dispose()
  241. =========
  242.  
  243.        sypnosis:
  244.     dispose(name1,name2,...)
  245.  
  246.        arguments:
  247.     name1,name2,...: object names
  248.  
  249.        result:
  250. n/a
  251.  
  252.    This will dispose the previously defined objects with the given name.
  253.  
  254. disposeall()
  255. ============
  256.  
  257.        sypnosis:
  258.     disposeall()
  259.  
  260.        arguments:
  261. n/a
  262.  
  263.        result:
  264. n/a
  265.  
  266.    This will dispose all previously defined objects.
  267.  
  268. do()
  269. ====
  270.  
  271.        sypnosis:
  272.     do(ex1,ex2,...)
  273.  
  274.        arguments:
  275.     ex1,ex2,...: expression of any type
  276.  
  277.        result:
  278. result of the last expression
  279.  
  280.    This is a synonym for an expression list (see Manual/Expressions).
  281. E.g.
  282.      {debug("Hello world !"), sin(2)}
  283.      do(debug("Hello world !"), sin(2))
  284.  
  285. drop()
  286. ======
  287.  
  288.        sypnosis:
  289.     drop(ex)
  290.  
  291.        arguments:
  292.     ex: any
  293.  
  294.        result:
  295. n/a
  296.  
  297.    Evaluates ex, without returning a result.
  298.  
  299. eq()
  300. ====
  301.  
  302.        sypnosis:
  303.     eq(left,right)
  304.  
  305.        arguments:
  306.     left,right: expressions of any type
  307.  
  308.        result:
  309. equation
  310.  
  311.    Creates an equation with the given left and right side.
  312.  
  313. eqleft(), eqright()
  314. ===================
  315.  
  316.        sypnosis:
  317.     eqleft(e), eqright(e)
  318.  
  319.        arguments:
  320.     e: equation
  321.  
  322.        result:
  323. depends on equation contents
  324.  
  325.    Return the left or right side of the equation e.
  326.  
  327. error()
  328. =======
  329.  
  330.        sypnosis:
  331.     error(s)
  332.  
  333.        arguments:
  334.     s: set of number elements
  335.  
  336.        result:
  337. number
  338.  
  339.    Returns the statistical error of the average value, which is
  340. error(s) := sigma(s)/(sqrt(count(s)).
  341.  
  342. eval()
  343. ======
  344.  
  345.        sypnosis:
  346.     eval(ex)
  347.  
  348.        arguments:
  349.     ex: expression on any type
  350.  
  351.        result:
  352. depends on the expression
  353.  
  354.    This will evaluate the given expression. Parameters are replaced, too
  355. (see Manual/parameter).
  356.  
  357. exp()
  358. =====
  359.  
  360.        sypnosis:
  361.     exp(x)
  362.  
  363.        arguments:
  364.     x: number
  365.  
  366.        result:
  367. number
  368.  
  369.    Return e to the power of x.
  370.  
  371. fak()
  372. =====
  373.  
  374.        sypnosis:
  375.     fak(x)
  376.  
  377.        arguments:
  378.     x: integer
  379.  
  380.        result:
  381. number
  382.  
  383.    Returns x! (factorial). If x <= 00 is returned.
  384.  
  385. for()
  386. =====
  387.  
  388.        sypnosis:
  389.     for(init,cond,ex,end)
  390.  
  391.        arguments:
  392.     init: any
  393.     cond: boolean
  394.     ex: any
  395.     end: any
  396.     result:
  397. depends on end
  398.  
  399.    First the init expression will be evaluated, which is usually an
  400. variable definition. That ex will be repeatedly evaluated as long as
  401. cond evaluates to TRUE. When the loop is finished (cond is
  402. FALSE), end will be evaluated and it's result will be returned.
  403.      f(x) = for({n=0, f(x)=0}, n<10, {f(x)=f(x)+x^n, n=n+1}, f(x))
  404.  
  405. if()
  406. ====
  407.  
  408.        sypnosis:
  409.     if(cond,ex1,ex2)
  410.  
  411.        arguments:
  412.     cond: boolean
  413.     ex1,ex2: any
  414.  
  415.        result:
  416. depends on expressions
  417.  
  418.    If cond evaluates to TRUEex1 will be evaluated, else
  419. ex2.
  420.  
  421. im()
  422. ====
  423.  
  424.        sypnosis:
  425.     im(x)
  426.  
  427.        arguments:
  428.     x: number
  429.  
  430.        result:
  431. number
  432.  
  433.    Returns the imaginary part of x.
  434.  
  435. include()
  436. =========
  437.  
  438.        sypnosis:
  439.     include(path)
  440.  
  441.        arguments:
  442.     path: path of the include file
  443.  
  444.        result:
  445. n/a
  446.  
  447.    This will load and process a file from the directory Include.  See
  448. also Manual/Libraries.
  449.  
  450. inv()
  451. =====
  452.  
  453.        sypnosis:
  454.     inv(x)
  455.  
  456.        arguments:
  457.     x: number
  458.  
  459.        result:
  460. number
  461.  
  462.    Returns the invers 1/x.
  463.  
  464. invert()
  465. ========
  466.  
  467.        sypnosis:
  468.     invert(m)
  469.  
  470.        arguments:
  471.     m: matrix
  472.  
  473.        result:
  474. matrix
  475.  
  476.    Returns the invers of the matrix m.
  477.  
  478. isatomar()
  479. ==========
  480.  
  481.        sypnosis:
  482.     isatomar(x)
  483.  
  484.        arguments:
  485.     x: any
  486.  
  487.        result:
  488. boolean
  489.  
  490.    Return TRUE, if x is an atomar object.
  491.  
  492. Type checking
  493. =============
  494.  
  495.        sypnosis:
  496.     isnumber(x), iscomplex(x), isvector(x),
  497. ismatrix(x), isboolean(x), isset(x),
  498. isequation(x)
  499.  
  500.        arguments:
  501.     x: any
  502.  
  503.        result:
  504. boolean
  505.  
  506.    Return TRUE, if x is of the specified type.
  507.  
  508. ln(), log()
  509. ===========
  510.  
  511.        sypnosis:
  512.     ln(x), log(x)
  513.  
  514.        arguments:
  515.     x: positive number
  516.  
  517.        result:
  518. number
  519.  
  520.    Returns ln x (base e), or log x (base 10).
  521.  
  522. multrow()
  523. =========
  524.  
  525.        sypnosis:
  526.     multrow(m,r,x)
  527.  
  528.        arguments:
  529.     m: matrix
  530.     r: integer between 0 and rows(m)
  531.     x: number
  532.  
  533.        result:
  534. matrix
  535.  
  536.    Returns the matrix m, except that rows r is multiplied with
  537. x.
  538.  
  539. nand()
  540. ======
  541.  
  542.        sypnosis:
  543.     nand(b1,b2)
  544.  
  545.        arguments:
  546.     b1,b2: boolean
  547.  
  548.        result:
  549. boolean
  550.  
  551.    Return FALSE, if b1 and b2 are TRUE, else TRUE.
  552.  
  553. neg()
  554. =====
  555.  
  556.        sypnosis:
  557.     neg(x)
  558.  
  559.        arguments:
  560.     x: number, vector, matrix
  561.  
  562.        result:
  563. number, vector, matrix
  564.  
  565.    Returns the negative of the given number, vector or matrix. For
  566. Vectors and Matrices, all components are negated.
  567.  
  568. nor()
  569. =====
  570.  
  571.        sypnosis:
  572.     nor(b1,b2)
  573.  
  574.        arguments:
  575.     b1,b2: boolean
  576.  
  577.        result:
  578. boolean
  579.  
  580.    Return TRUE, if b1 and b2 are FALSE, else FALSE.
  581.  
  582. norm()
  583. ======
  584.  
  585.        sypnosis:
  586.     norm(a)
  587.  
  588.        arguments:
  589.     a: number, vector, matrix
  590.  
  591.        result:
  592. number, vector, matrix
  593.  
  594.    If a is a vector, the normed vector will be returned (the vector
  595. pointing into the same direction, but with abs(a) = 1). If a is a
  596. matrix every column vector will be normed.
  597.  
  598.    If a is a complex number it will be treated as a two-dimensional
  599. vector.  A real number will always be normed to one.
  600.  
  601. orthogonal()
  602. ============
  603.  
  604.        sypnosis:
  605.     orthogonal(m)
  606.  
  607.        arguments:
  608.     m: matrix
  609.  
  610.        result:
  611. matrix
  612.  
  613.    Use the Gram-Schmitt-algorithm to create a orthogonalized base of the
  614. column vectors of m.
  615.  
  616. quickhelp()
  617. ===========
  618.  
  619.        sypnosis:
  620.     quickhelp(keyword)
  621.  
  622.        arguments:
  623.     keyword: keyword to search for
  624.  
  625.        result:
  626. a short description
  627.  
  628.    Shows a short description for the given keyword. Same as
  629. ?keyword.  See also Manual/Online Help.
  630.  
  631. random(), irandom(), randomseed()
  632. =================================
  633.  
  634.        sypnosis:
  635.     random(x), irandom(n), randomseed(x)
  636.  
  637.        arguments:
  638.     x: positive number, optional, defaults to 1
  639.     n: positiv integer
  640.  
  641.        result:
  642.     random()irandom(): number
  643.     randomseed(): n/a
  644.  
  645.        random(x) returns a random number between 0 and x; you
  646. may omit x, which defaults then to 1.
  647.  
  648.        irandom(n) returns a integer between 0 and n.
  649.  
  650.        randomseed(n) sets the initial value for the random
  651. algorithm.
  652.  
  653. rank()
  654. ======
  655.  
  656.        sypnosis:
  657.     rank(m)
  658.  
  659.        arguments:
  660.     m: matrix
  661.  
  662.        result:
  663. number
  664.  
  665.    Returns the rank of the matrix m.
  666.  
  667. re()
  668. ====
  669.  
  670.        sypnosis:
  671.     re(x)
  672.  
  673.        arguments:
  674.     x: number
  675.  
  676.        result:
  677. number
  678.  
  679.    Returns the real part of x.
  680.  
  681. rows()
  682. ======
  683.  
  684.        sypnosis:
  685.     rows(m)
  686.  
  687.        arguments:
  688.     m: matrix
  689.  
  690.        result:
  691. number
  692.  
  693.    Returns the number of rows of the matrix m.
  694.  
  695. rvector()
  696. =========
  697.  
  698.        sypnosis:
  699.     rvector(m,r)
  700.  
  701.        arguments:
  702.     m: matrix
  703.     r: integer between 0 and rows(m)
  704.  
  705.        result:
  706. vector
  707.  
  708.    Returns a vector, consisting of the row r of the matrix m.
  709.  
  710. set()
  711. =====
  712.  
  713.        sypnosis:
  714.     set(a1,a2,...)
  715.  
  716.        arguments:
  717.     a1,a2,...: any
  718.  
  719.        result:
  720. set
  721.  
  722.    Creates a set of the given elements. All elements must be of the same
  723. type.
  724.  
  725. showhelp()
  726. ==========
  727.  
  728.        sypnosis:
  729.     showhelp(keyword)
  730.  
  731.        arguments:
  732.     keyword: keyword to search for
  733.  
  734.        result:
  735. n/a
  736.  
  737.    Shows detailed help for the given keyword. Same as ??keyword.  See
  738. also Manual/Online Help.
  739.  
  740. sigma()
  741. =======
  742.  
  743.        sypnosis:
  744.     sigma(s)
  745.  
  746.        arguments:
  747.     s: set of number elements
  748.  
  749.        result:
  750. number
  751.  
  752.    Returns the standart error of the given set elements, which is
  753. defined as sqrt(sum((x - y)^2)/(count(s-1) with y =
  754. average(s).
  755.  
  756. sign()
  757. ======
  758.  
  759.        sypnosis:
  760.     sign(x)
  761.  
  762.        arguments:
  763.     x: number
  764.  
  765.        result:
  766. number
  767.  
  768.    Returns -1, if x < 00, if x = 0 and 1 if x > 0.
  769.  
  770. solve()
  771. =======
  772.  
  773.        sypnosis:
  774.     solve(m)
  775.  
  776.        arguments:
  777.     m: matrix
  778.  
  779.        result:
  780. matrix
  781.  
  782.    Apply the gaussian algorithm to the matrix m.
  783.  
  784. spur()
  785. ======
  786.  
  787.        sypnosis:
  788.     spur(m)
  789.  
  790.        arguments:
  791.     m: matrix
  792.  
  793.        result:
  794. number
  795.  
  796.    Return the spur of the matrix mm must be square.  spur(m)
  797. := sum(x_ii), m = [x_ij, 1<=i<=n, 1<=j<=n]
  798.  
  799. sqrt()
  800. ======
  801.  
  802.        sypnosis:
  803.     sqrt(x)
  804.  
  805.        arguments:
  806.     x: positive number
  807.  
  808.        result:
  809. number
  810.  
  811.    Returns the square root of x.
  812.  
  813. swaprows()
  814. ==========
  815.  
  816.        sypnosis:
  817.     swaprows(m,r1,r2)
  818.  
  819.        arguments:
  820.     m: matrix
  821.     r1,r2: integer between 0 and rows(m)
  822.  
  823.        result:
  824. matrix
  825.  
  826.    Return the matrix m, except that rows r1 and r2 are swapped.
  827.  
  828. taylor()
  829. ========
  830.  
  831.        sypnosis:
  832.     taylor(ex,x,a,n)
  833.  
  834.        arguments:
  835.     ex: expression of number type
  836.     x: number
  837.     a: number
  838.     n: positive integer
  839.  
  840.        result:
  841. expression of number type
  842.  
  843.    This will calculate a taylor approximation for the given expression
  844. of the variable x at the point a of the given grade n. If you
  845. omit n, a default of 2 will be used, e.g.:
  846.      f(x) = taylor(sin(x), x, 0)
  847.      g(x) = taylor(ln(x), x, 1)
  848.      h(x) = taylor(exp(x), x, 0, 5)
  849.  
  850.    See also the remark to the diff() function. The same restrictions
  851. apply to the taylor() function.
  852.  
  853. trans()
  854. =======
  855.  
  856.        sypnosis:
  857.     trans(m)
  858.  
  859.        arguments:
  860.     m: matrix
  861.  
  862.        result:
  863. matrix
  864.  
  865.    Returns the transposed matrix of m.
  866.  
  867. Trigonometric functions
  868. =======================
  869.  
  870.        sypnosis:
  871.     sin(x), cos(x), tan(x), cot(x), asin(x),
  872. acos(x), atan(x), acot(x), sinh(x), cosh(x),
  873. tanh(x), asinh(x), acosh(x), atanh(x)
  874.  
  875.        arguments:
  876.     x: number
  877.  
  878.        result:
  879. number
  880.  
  881.    well, the well known trigonometric functions, should I say more...
  882.  
  883. umatrix()
  884. =========
  885.  
  886.        sypnosis:
  887.     umatrix(n)
  888.  
  889.        arguments:
  890.     n: positive integer
  891.  
  892.        result:
  893. matrix
  894.  
  895.    This will create a standart matrix of the given size.
  896.  
  897. window()
  898. ========
  899.  
  900.        sypnosis:
  901.     window(name)
  902.  
  903.        arguments:
  904.     name: object name
  905.  
  906.        result:
  907. n/a
  908.  
  909.    This will open a window, displaying the named object.
  910.  
  911.